// water.vert
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;

uniform mat4 u_projTrans;
uniform float u_time;
uniform float u_waveIntensity;
uniform float u_waveSpeed;

varying vec4 v_color;
varying vec2 v_texCoords;
varying vec2 v_worldPos;

void main() {
    vec4 position = a_position;
    
    // 简单的水面顶点波动（可选，主要用于3D水面）
    // 对于2D水面，主要在片段着色器中处理效果
    //float wave = sin(u_time * u_waveSpeed + position.x * 10.0) * u_waveIntensity;
    //position.y += wave;
    
    gl_Position = u_projTrans * position;
    
    v_color = a_color;
    v_texCoords = a_texCoord0;
    v_worldPos = vec2(position.x, position.y);
}